package com.book.manager.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.book.manager.dto.BookBorrowDetail;
import com.book.manager.model.RelUserBook;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RelUserBookMapper extends BaseMapper<RelUserBook> {

    RelUserBook findRelUserBookWithUserIdBookId(@Param("userId")int userId,@Param("bookId")int bookId,
                                                @Param("bookCode")String bookCode);

    List<BookBorrowDetail> borrowBookDetailWithBookId(@Param("bookId")int bookId);

    List<BookBorrowDetail> borrowBookDetailWithMe(@Param("userId")int userId);

}
